#pragma once

// Needs review -- This is just a stub class
namespace AVUI
{

class IInputElement;

/// <summary>This interface is implemented by layouts which host <see cref="T:System.Windows.ContentElement" />. </summary>
class IContentHost
{
public:

    /// <summary>Returns a collection of bounding rectangles for a child element. </summary>
    /// <returns />
    /// <param name="child">The child element that the bounding rectangles are returned for.</param>
    /// <exception cref="T:System.ArgumentNullException">If child is null.</exception>
    /// <exception cref="T:System.ArgumentException">If the element is not a direct descendant (i.e. element must be a child of the <see cref="T:System.Windows.IContentHost" /> or a <see cref="T:System.Windows.ContentElement" /> which is a direct descendant  of the <see cref="T:System.Windows.IContentHost" />).</exception>
    virtual TRefCountedPtr<Object> GetRectangles(ContentElement* pChild) = 0;

    /// <summary>Performs hit-testing for child elements.</summary>
    /// <returns>A descendant of <see cref="T:System.Windows.IInputElement" />, or NULL if no such element exists.</returns>
    /// <param name="point">Mouse coordinates relative to the ContentHost.</param>
    virtual IInputElement* InputHitTest(const Point& point) = 0;

    /// <summary> Called when a <see cref="T:System.Windows.UIElement" />-derived class which is hosted by a <see cref="T:System.Windows.IContentHost" /> changes its <see cref="P:System.Windows.UIElement.DesiredSize" />.</summary>
    /// <returns />
    /// <param name="child">Child element whose <see cref="P:System.Windows.UIElement.DesiredSize" /> has changed</param>
    /// <exception cref="T:System.ArgumentNullException">If child is null.</exception>
    /// <exception cref="T:System.ArgumentException">If child is not a direct descendant (i.e. child must be a child of the <see cref="T:System.Windows.IContentHost" /> or a <see cref="T:System.Windows.ContentElement" /> which is a direct descendant of the <see cref="T:System.Windows.IContentHost" />).</exception>
    virtual void OnChildDesiredSizeChanged(UIElement* pChild) = 0;

    /// <summary>Gets an enumeration containing all descendant <see cref="T:System.Windows.ContentElement" />-derived classes, as well as all <see cref="T:System.Windows.UIElement" />-derived classes that are a direct descendant of the <see cref="T:System.Windows.IContentHost" /> or one of its descendant <see cref="T:System.Windows.ContentElement" /> classes. </summary>
    /// <returns>Enumeration containing all descendant <see cref="T:System.Windows.ContentElement" />-derived classes, as well as all <see cref="T:System.Windows.UIElement" />-derived classes that are a direct descendant of the <see cref="T:System.Windows.IContentHost" /> or one of its descendant <see cref="T:System.Windows.ContentElement" /> classes. In other words, elements for which the <see cref="T:System.Windows.IContentHost" /> creates a visual representation (<see cref="T:System.Windows.ContentElement" />-derived classes) or whose layout is driven by the <see cref="T:System.Windows.IContentHost" /> (the first-level descendant <see cref="T:System.Windows.UIElement" />-derived classes).</returns>
    virtual TRefCountedPtr<Object> get_HostedElements() = 0;
};


};




